<template>
  <div id="app">
    <!--    <div id="nav">-->
    <!--      <router-link to="/">Home</router-link> |-->
    <!--      <router-link to="/about">About</router-link>|-->
    <!--      <router-link to="/player">Player</router-link>-->
    <!--    </div>-->
    <!--    <router-view />-->
    <el-container>
      <el-header height="80px"> </el-header>
      <el-container>
        <el-aside width="160px">
          <!--          数据绑定-->
          <!--          <el-menu :router="true">-->
          <!--          方便进行样式的修改-->
          <el-menu router :default-active="$route.path">
            <!--          <el-menu router>-->
            <el-menu-item index="/">
              <template slot="title">
                <span>主页</span>
              </template>
            </el-menu-item>
            <el-menu-item index="/about">
              <template slot="title">
                <span>关于</span>
              </template>
            </el-menu-item>
            <el-menu-item index="/player">
              <template slot="title">
                <span>人物信息</span>
              </template>
            </el-menu-item>
            <el-menu-item index="/dealBIll">
              <template slot="title">
                <span>交易信息</span>
              </template>
            </el-menu-item>
            <el-menu-item index="/book">
              <template slot="title">
                <span>图书列表</span>
              </template>
            </el-menu-item>
          </el-menu>
          <!--          <el-menu>-->
          <!--            <el-menu-item index="/">哈哈</el-menu-item>-->
          <!--            <el-menu-item index="/about">嘻嘻</el-menu-item>-->
          <!--            <el-menu-item index="/player">嘿嘿</el-menu-item>-->
          <!--          </el-menu>-->

          <!--          <router-link to="/">Home</router-link> |-->
          <!--          <router-link to="/about">About</router-link>|-->
          <!--          <router-link to="/player">Player</router-link>-->
        </el-aside>
        <el-main>
          <!--          是一个模板的载体要不然都显示不出来-->
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
// import New from './components/New.vue';
export default {
  name: "Player",
  components: {
    // New,Old,
  },
  props: {
    sampleP: {
      type: Number,
      default: 0,
    },
  },
  data() {
    return {
      sampleD: "value",
    };
  },
  computed: {
    // sampleC() {
    //     return this.sampleD+'--';
    // }
  },
  //window.log:软件加载时发送请求
  created() {
    // this.initProfessionTypes();
    //this.$store.actions.getProfessionTypes();
    this.$store.dispatch("getProfessionTypes");
    this.$store.dispatch("getDealStates");
  },
  mounted() {},
  methods: {
    sampleM() {},
    // initProfessionTypes() {
    //   this.$http({
    //     method: "get",
    //     url: "/ceto/common/professionTypes",
    //   }).then(
    //     (res) => {
    //       // this.$message.warning(JSON.stringify(res.data));
    //       console.log(this.$store.state.professionTypes);
    //       //this.$store.mutations.updateProfessionTypes(this.state..payload)
    //       //this.$store.commit("updateProfessionTypes",payload);
    //       this.$store.commit("updateProfessionTypes", res.data);
    //     },
    //     (error) => {
    //       console.log(" request error : " + error.response.status);
    //     }
    //   );
  },
  // },
  watch: {
    // sampleC(newValue, oldValue) {
    //
    // }
  },
};
</script>

<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

#nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}

.el-header {
  background-color: #6c69ff;
}

.el-aside {
  background-color:#6c69ff;
  min-height: 600px;
}

.el-main {
  background-color: #dfe1ff;
}
</style>
